<template>
  <div class="section create-sections">
    <el-collapse-item :name="name">
      <div
        v-show="title && title.length > 0"
        slot="title"
        class="section-header">
        <div
          :style="{ 'border-left-color': mColor }"
          class="section-mark"/>
        <div :style="{'font-size': fontSize ? fontSize : '14px'}" class="section-title">{{ title }}</div>
      </div>
      <div class="content create-sections-content">
        <slot/>
      </div>
    </el-collapse-item>
  </div>
</template>
<script type="text/javascript">
export default {
  name: 'CreateSections',
  components: {},
  props: {
    name: {
      type: String,
      default: ''
    },
    title: {
      type: String,
      default: ''
    },
    mColor: {
      type: String,
      default: '#2362FB'
    },
    fontSize: {
      type: String,
      default: '14px'
    }
  },
  data() {
    return {}
  },
  computed: {},
  mounted() {},
  methods: {}
}
</script>
<style lang="scss" scoped>
.section {
  position: relative;
  background-color: white;
  margin-top: 8px;
}
.section:first-child {
  margin-top: 0;
}

.section-mark {
  border-left-width: 4px;
  border-left-style: solid;
  border-radius: 2px;
  height: 14px;
}

.section-header {
  display: flex;
  align-items: center;
  padding: 20px 15px;
}
.section-title {
  font-size: 14px;
  color: #333;
  font-weight: 600;
  margin-left: 8px;
  flex-shrink: 0;
}

.create-sections__more {
  position: absolute;
  right: 15px;
}

.content {
  padding: 0 10px;
}
</style>
